package conf

import (
	"log"

	"github.com/spf13/viper"
)

type cosConfig struct {
	CosSecretID  string `mapstructure:"cosSecretID"`
	CosSecretKey string `mapstructure:"cosSecretKey"`
	CosBucketURL string `mapstructure:"cosBucketURL"`
}

// CosConf cos config
var CosConf = &cosConfig{}

func initCosConf() {
	if err := viper.UnmarshalKey("cos", CosConf); err != nil {
		log.Fatalf("Parse config.cos segment error: %s", err)
	}
}
